# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas

pkgname=kinfocenter
pkgver=5.10.95
pkgrel=1
pkgdesc='A utility that provides information about a computer system'
arch=('i686' 'x86_64')
url='https://www.kde.org/applications/system/kinfocenter/'
license=('LGPL')
depends=('kcmutils' 'pciutils' 'glu' 'libraw1394' 'kwayland')
makedepends=('extra-cmake-modules' 'python' 'plasma-framework' 'kdoctools')
conflicts=('kdebase-workspace')
groups=('plasma')
source=("https://download.kde.org/unstable/plasma/${pkgver}/$pkgname-$pkgver.tar.xz"{,.sig} 
'archlinux-logo.svg::https://sources.archlinux.org/other/artwork/archlinux-logo-dark-scalable.svg' 'kcm-about-distrorc')
sha256sums=('503dba4c24c346da08f4c5bac5688caae36efd006d83a03fcc35ee073913c7ff'
            'SKIP'
            'a7f37c9c87f0e0e37454b47ec1221b61416aa9e319cc46a1f0b5b70c4a1dcb6e'
            '02ae86f5ef8de5fabb97db2043065c9b6b77b7c6a71a1115161e559e39c01451')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E'  # Jonathan Riddell
              '348C8651206633FD983A8FC4DEACEA00075E1D76'  # KDE Neon
              'D07BD8662C56CB291B316EB2F5675605C74E02CF') # David Edmundson

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../${pkgname}-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install

# Install Arch logo
  install -Dm644 "$srcdir"/archlinux-logo.svg "$pkgdir"/usr/share/about-distro/archlinux-logo.svg
  install -Dm644 "$srcdir"/kcm-about-distrorc "$pkgdir"/etc/xdg/kcm-about-distrorc
}
